<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!--适配移动设备-->
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Clean Blog</title>
    <!--bootstrap CSS 核心文件-->
    <link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="css/backstage.css"/>
    <!--fonts字体图标库-->
    <link rel="stylesheet" href="css/font-awesome.min.css" rel="stylesheet" type=text/css>
    <!--不支持HTML5和不支持media查询的浏览器使用下面两个js插件兼容-->
    <!--if 1t IE 9-->
    <!--当浏览器不支持html5标签需要引入核心的js文件-->
    <script src="lib/html5shiv/html5shiv.min.js"></script>
    <!--当不支持媒体查询时引入respond.js本地文件-->
    <script src="lib/respond/respond.js"></script>
</head>

<body>
<div id="wrapper">
    <!-- Navigation -->
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="index.html">jiaoshou</a>
        </div>
        <!-- Top Menu Items -->
        <ul class="nav navbar-right top-nav">
            <li class="dropdown">
                <a href="#" class="dropdown-toggle icon-envelope" data-toggle="dropdown"><i class="fa fa-envelope"></i>
                    <b class="caret"></b></a>
                <ul class="dropdown-menu message-dropdown">
                    <li class="message-preview">
                        <a href="#">
                            <div class="media">
                                <span class="pull-left"><img class="media-object" src="http://placehold.it/50x50"
                                                             alt=""></span>

                                <div class="media-body">
                                    <h5 class="medi a-heading"><strong>js</strong></h5>

                                    <p class="small text-muted"><i class="fa icon-time"></i> Yesterday at 4:32 PM</p>

                                    <p>Lorem ipsum dolor sit amet, consectetur...</p>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="message-preview">
                        <a href="#">
                            <div class="media">
                                <span class="pull-left"><img class="media-object" src="http://placehold.it/50x50"
                                                             alt=""></span>

                                <div class="media-body">
                                    <h5 class="media-heading"><strong>js</strong></h5>

                                    <p class="small text-muted"><i class="fa icon-time"></i> Yesterday at 4:32 PM</p>

                                    <p>Lorem ipsum dolor sit amet, consectetur...</p>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="message-preview">
                        <a href="#">
                            <div class="media">
                                <span class="pull-left"><img class="media-object" src="http://placehold.it/50x50"
                                                             alt=""></span>

                                <div class="media-body">
                                    <h5 class="media-heading"><strong>js</strong></h5>

                                    <p class="small text-muted"><i class="fa fa-clock-o"></i> Yesterday at 4:32 PM</p>

                                    <p>Lorem ipsum dolor sit amet, consectetur...</p>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="message-footer">
                        <a href="#">Read All New Messages</a>
                    </li>
                </ul>
            </li>
            <li class="dropdown">
                <a href="#" class="dropdown-toggle icon-bell-alt" data-toggle="dropdown"><i class="fa fa-bell"></i> <b
                        class="caret"></b></a>
                <ul class="dropdown-menu alert-dropdown">
                    <li><a href="#">Alert Name <span class="label label-default">Alert Badge</span></a></li>
                    <li><a href="#">Alert Name <span class="label label-primary">Alert Badge</span></a></li>
                    <li><a href="#">Alert Name <span class="label label-success">Alert Badge</span></a></li>
                    <li><a href="#">Alert Name <span class="label label-info">Alert Badge</span></a></li>
                    <li><a href="#">Alert Name <span class="label label-warning">Alert Badge</span></a></li>
                    <li><a href="#">Alert Name <span class="label label-danger">Alert Badge</span></a></li>
                    <li class="divider"></li>
                    <li><a href="#">View All</a></li>
                </ul>
            </li>
            <li class="dropdown">
                <a href="#" class="dropdown-toggle icon-user" data-toggle="dropdown"><i class="fa fa-user"></i> js <b
                        class="caret"></b></a>
                <ul class="dropdown-menu">
                    <li><a href="#"><i class="fa fa-fw  icon-user"></i> Profile</a></li>
                    <li><a href="#"><i class="fa fa-fw icon-envelope-alt"></i> Inbox</a></li>
                    <li><a href="#"><i class="fa fa-fw icon-cog"></i> Settings</a></li>
                    <li class="divider"></li>
                    <li><a id="logout" href="#"><i class="fa fa-fw icon-off"></i> Log Out</a></li>
                </ul>
            </li>
        </ul>
        <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
        <div class="collapse navbar-collapse navbar-ex1-collapse">
            <ul class="nav navbar-nav side-nav">
                <li class="active"><a href="/admin/posts/index"><i class="fa fa-fw icon-dashboard"></i> 帖子管理</a></li>
                <li><a href="/admin/users/index"><i class="fa fa-fw icon-table"></i> 用户管理</a></li>
                <li><a href="forms.html"><i class="fa fa-fw icon-edit"></i> Forms</a></li>
                <li><a href="bootstrap-elements.html"><i class="fa fa-fw icon-laptop"></i> Bootstrap Elements</a></li>
                <li><a href="bootstrap-grid.html"><i class="fa fa-fw icon-wrench"></i> Bootstrap Grid</a></li>
                <li>
                    <a href="javascript:;" data-toggle="collapse" data-target="#demo"><i
                            class="fa fa-fw icon-resize-vertical"></i> Dropdown <i class="fa fa-fw icon-caret-down"></i></a>
                    <ul id="demo" class="collapse">
                        <li><a href="#">Dropdown Item</a></li>
                        <li><a href="#">Dropdown Item</a></li>
                    </ul>
                </li>
                <li><a href="blank-page.html"><i class="fa fa-fw icon-file"></i> Blank Page</a></li>
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </nav>
    <div id="page-wrapper" style="min-height: 100vh;">
        <div class="container-fluid">
            <!-- Page Heading -->
            <h1 class="page-header">后台管理</h1>
            <div class="row">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><i class="fa icon-money fa-fw"></i> 帖子管理</h3>
                    </div>
                    <div class="panel-body">
                        <div class="table-responsive">
                            <button id="btnAdd" class="btn btn-primary">添加</button>

                            <div class="input-group">
                                <input id="txtSearch" type="text" class="form-control">
      <span class="input-group-btn">
        <button id="btnSearch" class="btn btn-default" type="button">Go!</button>
      </span>
                            </div>
                            <!-- /input-group -->
                        </div>
                        <!-- /.col-lg-6 -->

                        <table class="table table-bordered table-hover table-striped">
                            <thead>
                            <tr>
                                <th>序号</th>
                                <th>作者</th>
                                <th>标题</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <!--帖子内容模板-->
                            <tbody id="tbody">

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <!-- /.row -->

        <!-- /.container-fluid -->
    </div>
    <!-- /#page-wrapper -->


    <!-- Modal -->

<!--模态框-->
    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title" id="myModalLabel"></h4>
                </div>
                <div class="modal-body">
                    <form id="form" role="form">

                        <input type="hidden" id="id" name="id">

                        <div class="form-group">
                            <label for="title">标题</label>
                            <input type="text" class="form-control" id="title" placeholder="Enter title" name="title">
                        </div>
                        <div class="form-group">
                            <label for="content">内容</label>
                            <script type="text/plain" id="content" style="height:300px"></script>
                        </div>

                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button id="btnSave" type="button" class="btn btn-default" data-dismiss="modal">保存</button>
                </div>
            </div>
        </div>
    </div>
</div>


</body>

<script src="lib/jquery/jquery.min.js"></script>
<script src="lib/bootstrap/js/bootstrap.js"></script>
<script src="lib/artTemplate/template.js"></script>
<script src="lib/layer/layer.js"></script>
<script src="js/backstage.js"></script>
<script src="lib/ueditor/ueditor.config.js"></script>
<script src="lib/ueditor/ueditor.all.min.js"></script>
<script src="lib/ueditor/lang/zh-cn/zh-cn.js"></script>
<!--帖子内容模板-->
<script id="model" type="text/html">
    {{each data as value i}}
        <tr>
            <td>
               {{i+1}}
            </td>
            <td>
                {{value.nickname}}
            </td>
            <td>
                {{value.title}}
            </td>
            <td data-id={{value.id}}>
                <button class="btn btn-primary edit">编辑</button>
                <button class="btn btn-danger delegate">删除</button>
            </td>
        </tr>
    {{/each}}
</script>
<script src="js/backstage.js"></script>
</html>
